package com.ruoyi.project.zerocarbon.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.project.zerocarbon.domain.DeclareExpert;
import com.ruoyi.project.zerocarbon.mapper.DeclareExpertMapper;
import com.ruoyi.project.zerocarbon.service.IDeclareExpertService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-07-31
 */
@Service
public class DeclareExpertServiceImpl implements IDeclareExpertService 
{
    @Autowired
    private DeclareExpertMapper declareExpertMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param id 【请填写功能名称】ID
     * @return 【请填写功能名称】
     */
    @Override
    public DeclareExpert selectDeclareExpertById(Long id)
    {
        return declareExpertMapper.selectDeclareExpertById(id);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param declareExpert 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<DeclareExpert> selectDeclareExpertList(DeclareExpert declareExpert)
    {
        return declareExpertMapper.selectDeclareExpertList(declareExpert);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param declareExpert 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertDeclareExpert(DeclareExpert declareExpert)
    {
        declareExpert.setCreateTime(DateUtils.getNowDate());
        return declareExpertMapper.insertDeclareExpert(declareExpert);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param declareExpert 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateDeclareExpert(DeclareExpert declareExpert)
    {
        declareExpert.setUpdateTime(DateUtils.getNowDate());
        return declareExpertMapper.updateDeclareExpert(declareExpert);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param ids 需要删除的【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteDeclareExpertByIds(Long[] ids)
    {
        return declareExpertMapper.deleteDeclareExpertByIds(ids);
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param id 【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteDeclareExpertById(Long id)
    {
        return declareExpertMapper.deleteDeclareExpertById(id);
    }
}
